﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Security.Text
{
    /// <summary>
    /// 
    /// </summary>
    public class SHA1Cipher : Cipher
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="plainText"></param>
        public SHA1Cipher(string plainText) : base(plainText)
        {

        }
        /// <summary>
        /// 普通明文形式的字符串转为SHA1密码对象
        /// </summary>
        /// <param name="plainText"></param>
        /// <returns></returns>
        public static implicit operator SHA1Cipher(string plainText)
        {
            return new SHA1Cipher(plainText);
        }

        /// <summary>
        /// 
        /// </summary>
        public override string CipherText
        {
            get { return PlainText.SHA1Encrypt(); }
        }
    }
}
